Change in openvpn[master]: dco: disable DCO when using --reneg-bytes/pkts
A message that is not in the archive (sent off-list or not yet received): gerrit.1760629750000.I7b718a14b81e3759398e7a52fe151102494cc821@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
to review the following change.
Change subject: dco: disable DCO when using --reneg-bytes/pkts
......................................................................
dco: disable DCO when using --reneg-bytes/pkts
When using --reneg-bytes or --reneg-pkts, openvpn negotiates a new key upon reaching the specified threshold. This implies the usage of per-key counters. DCO, on the other hand, provides only global statistics, making it currently impossible to track when renegotiation should occur.
To avoid introducing unnecessary complexity into DCO, it is disabled when either of these options is specified. Instead, the automatic key renegotiation mechanism is preferred, as it provides a more modern and streamlined approach.
---
M src/openvpn/dco.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1280/1
src/openvpn/dco.c +7 -0
@@ -424,6 +424,13 @@return false; } +if (o->renegotiate_bytes >0 || o->renegotiate_packets) + { +msg (msglevel,"Note: '--reneg-bytes' and '--reneg-pkts' are not supported by DCO, " +"disabling data channel offload." ); +return false; + } +/* now that all options have been confirmed to be supported, check * if DCO is truly available on the system */
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
ralf_lici has posted comments on this change by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email )
Change subject: dco: disable DCO when using --reneg-bytes/pkts
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
After discussing this with ordex, we chose not to add compatibility for these options because no valid use case could be identified. More modern and automatic key renegotiation mechanisms are preferred and better aligned with current security practices. Supporting legacy options like these would introduce unnecessary complexity into DCO.
That said, any strong use case or objection to this approach is welcome
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 16 Oct 2025 15:50:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
[Openvpn-devel] [S] Change in openvpn[master]: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos.
Hello flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
to look at the new patch set (#2).
Change subject: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
......................................................................
options: warn and ignore --reneg-bytes/pkts when DCO is enabled
The --reneg-bytes and --reneg-pkts options rely on per-key counters to trigger key renegotiation. DCO, however, only provides global statistics, making it incompatible with these options.
Rather than adding complexity to support legacy behavior, ignore these options when DCO is enabled. Print a warning to inform users and update the manpage accordingly.
---
M doc/man-sections/renegotiation.rst
M src/openvpn/options.c
2 files changed, 22 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1280/2
doc/man-sections/renegotiation.rst +8 -0
@@ -19,10 +19,18 @@ the SWEET32 attack vector. For more information see the ``--cipher`` option. + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support per-key renegotiation thresholds; automatic key + renegotiation mechanisms are preferred. + --reneg-pkts n Renegotiate data channel key after **n** packets sent and received (disabled by default). + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support per-key renegotiation thresholds; automatic key + renegotiation mechanisms are preferred. + --reneg-sec args Renegotiate data channel key after at most ``max`` seconds (default :code:`3600`) and at least ``min`` seconds (default is 90% of
src/openvpn/options.c +14 -4
@@ -3317,11 +3317,21 @@dns_options_verify (M_FATAL , &o->dns_options); -if (dco_enabled (o) && o->enable_c2c) +if (dco_enabled (o)) { -msg (M_WARN ,"Note: --client-to-client has no effect when using data " -"channel offload: packets are always sent to the VPN " -"interface and then routed based on the system routing table" ); +if (o->enable_c2c) + { +msg (M_WARN ,"Note: --client-to-client has no effect when using data " +"channel offload: packets are always sent to the VPN " +"interface and then routed based on the system routing table" ); + } + +if (o->renegotiate_bytes >0 || o->renegotiate_packets) + { +msg (M_WARN ,"Note: '--reneg-bytes' and '--reneg-pkts' are not supported " +"by data channel offload; automatic key renegotiation " +"mechanisms are preferred. Ignoring these options." ); + } } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 2
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
[Openvpn-devel] [S] Change in openvpn[master]: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos.
Hello flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
to look at the new patch set (#3).
Change subject: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
......................................................................
options: warn and ignore --reneg-bytes/pkts when DCO is enabled
Thresholds specified by --reneg-bytes and --reneg-pkts cannot be enforced when DCO is enabled, as it only provides global statistics.
Rather than adding complexity to support these options, ignore them when DCO is enabled. Print a warning to inform users and update the manpage accordingly.
---
M doc/man-sections/renegotiation.rst
M src/openvpn/options.c
2 files changed, 23 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1280/3
doc/man-sections/renegotiation.rst +8 -0
@@ -19,10 +19,18 @@ the SWEET32 attack vector. For more information see the ``--cipher`` option. + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-pkts n Renegotiate data channel key after **n** packets sent and received (disabled by default). + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-sec args Renegotiate data channel key after at most ``max`` seconds (default :code:`3600`) and at least ``min`` seconds (default is 90% of
src/openvpn/options.c +15 -4
@@ -3317,11 +3317,22 @@dns_options_verify (M_FATAL , &o->dns_options); -if (dco_enabled (o) && o->enable_c2c) +if (dco_enabled (o)) { -msg (M_WARN ,"Note: --client-to-client has no effect when using data " -"channel offload: packets are always sent to the VPN " -"interface and then routed based on the system routing table" ); +if (o->enable_c2c) + { +msg (M_WARN ,"Note: --client-to-client has no effect when using data " +"channel offload: packets are always sent to the VPN " +"interface and then routed based on the system routing table" ); + } + +if (o->renegotiate_bytes >0 || o->renegotiate_packets) + { +msg (M_WARN ,"Note: '--reneg-bytes' and '--reneg-pkts' are not supported " +"by data channel offload; automatic key renegotiation " +"mechanisms are sufficient for modern ciphers. " +"Ignoring these options." ); + } } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 3
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
[Openvpn-devel] [S] Change in openvpn[master]: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos, ralf_lici.
cron2 has posted comments on this change by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email )
Change subject: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 3
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: ralf_lici <[email protected]...>
Gerrit-Comment-Date: Fri, 17 Oct 2025 19:15:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH v3 1/1 options: warn and ignore --reneg-bytes/pkts when DCO is enabled
In reply to a message not in the archiveFrom: Ralf Lici <[email protected]...>
Thresholds specified by --reneg-bytes and --reneg-pkts cannot be enforced when DCO is enabled, as it only provides global statistics.
Rather than adding complexity to support these options, ignore them when DCO is enabled. Print a warning to inform users and update the manpage accordingly.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1280
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1280
This mail reflects revision 3 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
doc/man-sections/renegotiation.rst +8 -0
@@ -19,10 +19,18 @@ the SWEET32 attack vector. For more information see the ``--cipher`` option. + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-pkts n Renegotiate data channel key after **n** packets sent and received (disabled by default). + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-sec args Renegotiate data channel key after at most ``max`` seconds (default :code:`3600`) and at least ``min`` seconds (default is 90% of
src/openvpn/options.c +15 -4
@@ -3317,11 +3317,22 @@dns_options_verify (M_FATAL , &o->dns_options); -if (dco_enabled (o) && o->enable_c2c) +if (dco_enabled (o)) { -msg (M_WARN ,"Note: --client-to-client has no effect when using data " -"channel offload: packets are always sent to the VPN " -"interface and then routed based on the system routing table" ); +if (o->enable_c2c) + { +msg (M_WARN ,"Note: --client-to-client has no effect when using data " +"channel offload: packets are always sent to the VPN " +"interface and then routed based on the system routing table" ); + } + +if (o->renegotiate_bytes >0 || o->renegotiate_packets) + { +msg (M_WARN ,"Note: '--reneg-bytes' and '--reneg-pkts' are not supported " +"by data channel offload; automatic key renegotiation " +"mechanisms are sufficient for modern ciphers. " +"Ignoring these options." ); + } } }
[Openvpn-devel] [PATCH applied] Re: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
We discussed this at length on IRC, and v3 is the result of that - our handling of AEAD ciphers, both in kernel space and in userland, is different from "old ciphers" because we auto-honour the given safety limits for AES key use. Since the kernel only does AEAD, no interface was made to send other arbitrary reneg-limits - and thus, we just ignore them in DCO mode.
The new thing in this patch is "OpenVPN will tell you", and so does the documentation. v1 went for "turn off DCO if this option is used", which was the wrong thing to do, given the abundance of openvpn config with stale cruft in them... but, we tell users :-)
Your patch has been applied to the master branch.
commit c9a320649bd4ec43d3f2640f70476178d8fcc660
Author: Ralf Lici Date: Fri Oct 17 21:16:06 2025 +0200
options: warn and ignore --reneg-bytes/pkts when DCO is enabled
Signed-off-by: Ralf Lici <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1280
Message-Id: <[email protected]...>
URL: https://sourceforge.net/p/openvpn/mailman/message/59248122/
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [S] Change in openvpn[master]: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
In reply to a message not in the archivecron2 has uploaded a new patch set (#4) to the change originally created by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
......................................................................
options: warn and ignore --reneg-bytes/pkts when DCO is enabled
Thresholds specified by --reneg-bytes and --reneg-pkts cannot be enforced when DCO is enabled, as it only provides global statistics.
Rather than adding complexity to support these options, ignore them when DCO is enabled. Print a warning to inform users and update the manpage accordingly.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1280
Message-Id: <[email protected]...>
URL: https://sourceforge.net/p/openvpn/mailman/message/59248122/
---
M doc/man-sections/renegotiation.rst
M src/openvpn/options.c
2 files changed, 23 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1280/4
doc/man-sections/renegotiation.rst +8 -0
@@ -19,10 +19,18 @@ the SWEET32 attack vector. For more information see the ``--cipher`` option. + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-pkts n Renegotiate data channel key after **n** packets sent and received (disabled by default). + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-sec args Renegotiate data channel key after at most ``max`` seconds (default :code:`3600`) and at least ``min`` seconds (default is 90% of
src/openvpn/options.c +15 -4
@@ -3317,11 +3317,22 @@dns_options_verify (M_FATAL , &o->dns_options); -if (dco_enabled (o) && o->enable_c2c) +if (dco_enabled (o)) { -msg (M_WARN ,"Note: --client-to-client has no effect when using data " -"channel offload: packets are always sent to the VPN " -"interface and then routed based on the system routing table" ); +if (o->enable_c2c) + { +msg (M_WARN ,"Note: --client-to-client has no effect when using data " +"channel offload: packets are always sent to the VPN " +"interface and then routed based on the system routing table" ); + } + +if (o->renegotiate_bytes >0 || o->renegotiate_packets) + { +msg (M_WARN ,"Note: '--reneg-bytes' and '--reneg-pkts' are not supported " +"by data channel offload; automatic key renegotiation " +"mechanisms are sufficient for modern ciphers. " +"Ignoring these options." ); + } } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 4
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
[Openvpn-devel] [S] Change in openvpn[master]: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
In reply to a message not in the archivecron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email )
Change subject: options: warn and ignore --reneg-bytes/pkts when DCO is enabled
......................................................................
options: warn and ignore --reneg-bytes/pkts when DCO is enabled
Thresholds specified by --reneg-bytes and --reneg-pkts cannot be enforced when DCO is enabled, as it only provides global statistics.
Rather than adding complexity to support these options, ignore them when DCO is enabled. Print a warning to inform users and update the manpage accordingly.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1280
Message-Id: <[email protected]...>
URL: https://sourceforge.net/p/openvpn/mailman/message/59248122/
---
M doc/man-sections/renegotiation.rst
M src/openvpn/options.c
2 files changed, 23 insertions(+), 4 deletions(-)
doc/man-sections/renegotiation.rst +8 -0
@@ -19,10 +19,18 @@ the SWEET32 attack vector. For more information see the ``--cipher`` option. + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-pkts n Renegotiate data channel key after **n** packets sent and received (disabled by default). + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-sec args Renegotiate data channel key after at most ``max`` seconds (default :code:`3600`) and at least ``min`` seconds (default is 90% of
src/openvpn/options.c +15 -4
@@ -3317,11 +3317,22 @@dns_options_verify (M_FATAL , &o->dns_options); -if (dco_enabled (o) && o->enable_c2c) +if (dco_enabled (o)) { -msg (M_WARN ,"Note: --client-to-client has no effect when using data " -"channel offload: packets are always sent to the VPN " -"interface and then routed based on the system routing table" ); +if (o->enable_c2c) + { +msg (M_WARN ,"Note: --client-to-client has no effect when using data " +"channel offload: packets are always sent to the VPN " +"interface and then routed based on the system routing table" ); + } + +if (o->renegotiate_bytes >0 || o->renegotiate_packets) + { +msg (M_WARN ,"Note: '--reneg-bytes' and '--reneg-pkts' are not supported " +"by data channel offload; automatic key renegotiation " +"mechanisms are sufficient for modern ciphers. " +"Ignoring these options." ); + } } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 4
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>